<% content_for :toolbar do %>
  <%= render "socializer/groups/toolbar" %>
<% end %>

<h1><%= t(".header", count: @pending_invites.count) %></h1>

<div class="row">
  <% @pending_invites.each do |membership| %>
    <%= render "socializer/groups/card", group: membership.group %>
  <% end %>
</div>

<ul class="large-group-list">
<% @pending_invites.each do |membership| %>
  <li>
    <div class="group-card <%= membership.group.privacy %>">
      <%= link_to membership.group do %>
        <div class="group-info">
          <span class="group-name"><%= membership.group.display_name %></span>
          <span class="group-member-count"><%= membership.group.members.count %> members</span>
          <span class="group-privacy-level"><%= membership.group.privacy %></span>
        </div>
      <% end %>
      <div class="group-actions">
        <%= link_to t(".decline"), decline_membership_path(membership), method: :post %> |
        <%= link_to t(".confirm"), confirm_membership_path(membership), method: :post %>
      </div>
    </div>
  </li>
<% end %>
</ul>
